<?php
	require_once "consql.php";
	
	if($_POST[zv]=='hyv'){
		$sql = "update tra set hyv=hyv+1 where id = 7";
		$result = mysql_query($sql);
	}
	
	if($_POST[zv]=='pyv'){
		$sql = "update tra set pyv=pyv+1 where id = 7";
		$result = mysql_query($sql);
	}
	
	if($_POST[zv]=='qqv'){
		$sql = "update tra set qqv=qqv+1 where id = 7";
		$result = mysql_query($sql);
	}
	
	if($_POST[zv]=='zf'){
		$openid=$_POST[openid];
//		$nickname=$_POST[nickname];
//		$sex=$_POST[sex];
		
		if(!empty($openid)){
			$sql="select * from openuser where openid='".$openid."'";
			$row= mysql_fetch_row(mysql_query($sql));
			if($row>=1){
				
			}else{
				
				//添加祝福人数的信息	
				$sql ="insert into openuser(openid) values('{$openid}')";
				mysql_query($sql);
				
				//祝福的人数+1
				$sql = "update zfrs set zf=zf+1 where id = 1";
				mysql_query($sql);
	
			}	
		}
		
		
		
	}
	
	if($_POST[zv]=='zfv'){
		$sql = "update zfrs set zf=zf+13 where id = 1";
		mysql_query($sql);
	}
	
//	require_once "consql.php";
//	$sql = "update tra set zv=zv+1 where id = 7";
//	$result = mysql_query($sql);
	
?>